package com.zxq.ai.domain.activity.strategy;

import com.zxq.ai.domain.activity.Activity;

public class SingleExecutionPolicy implements ExecutionPolicy {
    private boolean hasExecuted;

    public SingleExecutionPolicy() {
        this.hasExecuted = false;
    }

    @Override
    public void execute(Activity activity) {
        if (!hasExecuted) {

            hasExecuted = true;
        } else {
            System.out.println("This activity can only be executed once.");
        }
    }
}
